Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always allow changing player notification preferences on Android 13+ #11738

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

cillyvms
Copy link
Contributor

What is it?

  • Bugfix (user facing)

Description of the changes in your PR

Since Android 13 media player notifications are exempt from the notification settings/permission, however NewPipe currently disables all preferences in the notification section preventing the user from entering the player notification page.
I have tested this on my device and neither the global notification toggle/permission, nor disabling the specific channel used for player notifications would hide it.
Since system settings don't affect the display of the player notification, this PR makes it so that only the new stream notification preferences are disabled, when notifications are blocked by the system.

Before/After Screenshots/Screen Record

(Both screenshots taken on Android 15 with notification permission denied)

Before After
Screenshot_before Screenshot_after

Fixes the following issue(s)

  • No relevant issue

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

@github-actions github-actions bot added the size/small PRs with less than 50 changed lines label Nov 22, 2024
@AudricV AudricV added device/software specific Issues that only happen on some devices or with some specific hardware/software player notification Anything to do with the MediaStyle notification labels Nov 22, 2024
Copy link

sonarcloud bot commented Nov 22, 2024

@Profpatsch
Copy link
Contributor

I tried it out, disabled notification permission and switched the thumbnail setting, seems to work fine.
Haven’t reviewed the code.

Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me. I tested the following after disabling notifications (either by denying the permission or by manually disabling notifications in the app preferences on lower android versions).

  • on my phone (Android 13) -> player notifications visible and option visible
  • on API 34 emulated -> player notifications visible and option visible
  • on API 31 emulated -> player notification hidden and option hidden
  • on API 22 emulated -> player notification hidden and option hidden

Everything seems to work fine. Thank you for the PR!

@Stypox Stypox merged commit 52942ff into TeamNewPipe:dev Nov 27, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
device/software specific Issues that only happen on some devices or with some specific hardware/software player notification Anything to do with the MediaStyle notification size/small PRs with less than 50 changed lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants